package com.ding.easycontroller.model;

import lombok.Data;

@Data
public class R {

    public static final R OK;
    public static final R NotFound;

    static {
        OK = new R();
        OK.status = 200;
        OK.msg = "success";

        NotFound = new R();
        NotFound.status = 404;
        NotFound.msg = "not found";
    }

    public static R ok(Object body){
        R r = new R();
        r.status = 200;
        r.msg = "success";
        r.body = body;
        return r;
    }

    private int status;

    private String msg;

    private Object body;

}
